package com.atguigu.day12.comparator06.dog;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/13 16:04
 * @注释
 */
public class Dog{
    String name;
    int age;
    double weight;

    /*@Override
    public int compareTo(Dog o) {
        return this.age - o.age;
    }
*/
    /*@Override
    public int compareTo(Object o) {
        Dog d = (Dog) o;
        return this.age - d.age;
    }*/

    public Dog() {
    }

    public Dog(String name, int age, double weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }
}
